MeasureSubstring(Graphics,Font,StringFormat,Rectangle,String,IList<CharacterRange>) Method
In This Topic
Gets the bounds for displaying the part of this text.
Syntax
'Declaration
Public Overloads Shared Function MeasureSubstring( _
ByVal As System.Drawing.Graphics, _
ByVal As System.Drawing.Font, _
ByVal As System.Drawing.StringFormat, _
ByVal As System.Drawing.Rectangle, _
ByVal As System.String, _
ByVal As System.Collections.Generic.IList(Of CharacterRange) _
) As System.Drawing.Rectangle()
public static System.Drawing.Rectangle[] MeasureSubstring(
System.Drawing.Graphics ,
System.Drawing.Font ,
System.Drawing.StringFormat ,
System.Drawing.Rectangle ,
System.string ,
System.Collections.Generic.IList<CharacterRange>
)
Parameters
- graphics
- The device context.
- font
- The Font of text.
- stringFormat
- The text layout information.
- bounds
- The System.Drawing.Rectangle that represents the bounds of the text.
- text
- The text to draw.
- substringRanges
- Positions and lengths of all occurrences of substrings to highlight.
See Also